﻿namespace CloudNinja.Metering.Common.Logging
{
    using System;
    using System.Diagnostics;

    public class AzureDiagnosticLogger : ILogger
    {
        public void LogInformation(string information)
        {
            Trace.TraceInformation(string.Format("METERING TRACE {0}: {1}", DateTime.Now, information));
        }

        public void LogError(string errorString)
        {
            Trace.TraceError(string.Format("METERING ERROR {0}: {1}", DateTime.Now, errorString));
        }

        public void LogException(Exception exception)
        {
            Trace.TraceError(string.Format("METERING EXCEPTION {0}: {1}", DateTime.Now, exception.ToString()));
        }
    }
}